﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">
     

<h:head>
        <title>Central de Estagio Aluno</title>
        <link rel="StyleSheet" type="text/css" href="#{facesContext.externalContext.requestContextPath}/css/estilo.css" media="screen" />
        <link type="text/css" rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/css/tema/theme.css"/>

</h:head>
<body bgcolor="c9c9c9" >
<div align="center">
	<h:form>
	<div align="right"><p:commandButton icon="ui-icon-locked" oncomplete="adm.show()"/></div> 
    <p:graphicImage url="imagens/topo.jpg" width="1024"/>    	
	 <div align="center">
	 <p:tabView effect="fade" effectDuration="normal" width="1024" >    
        <p:tab title="Aluno" >
          <p:panelGrid>  
            <p:row >  
        		<p:column rowspan="3">
           			<p:graphicImage url="imagens/aluno.png" width="50" heigth="50"/>
           			<br></br>
           			<h:link value =" Esqueceu sua senha?"></h:link>           		 
        		</p:column>
        		<p:column>
          			Usuário: 
          		</p:column>
        		<p:column>
        		    <p:inputText size="20" value="#{MBLogin.usAluno}"/>
        		</p:column>   
    		</p:row>
    		<p:row>
    		    <p:column>
          			Senha:
        		</p:column>   
        		<p:column>
          			<p:password size="20" value="#{MBLogin.senhaAluno}"/>
        		</p:column>  
    		</p:row>
    		<p:row>
    		  <p:column colspan="2">
    		     <p:commandButton value="Entrar" actionListener="#{MBLogin.loginAluno}"/>
    		  </p:column>    		
    		</p:row>
    	  </p:panelGrid>
        </p:tab>  
        
        <p:tab title="Pessoa Física">
           <p:panelGrid>  
            <p:row >  
        		<p:column rowspan="4">
           			<p:graphicImage url="/imagens/empresa.jpg" width="50" heigth="50"/>
           			<br></br>
           			<p:commandLink value ="Esqueceu sua senha?" />
           			<br></br>
           			<p:commandLink value ="Cadastre-se" actionListener="#{MBEmpregador.desabilitaDialog}" action="#{MBEmpregador.prepararNovoF}" />       		 
        		</p:column>
        		<p:column>
          			ID: 
          		</p:column>
        		<p:column>
        		    <p:inputMask mask="999.999.999-99" size="20" value="#{MBLogin.usEmp}" />
        		</p:column>   
    		</p:row>
    		<p:row>
    		    <p:column>
          			Senha:
        		</p:column>   
        		<p:column>
          			<p:password size="20" value="#{MBLogin.senhaEmp}" />
        		</p:column>   		
    		</p:row>
    		<p:row>
    		  <p:column colspan="2">
    		     <p:commandButton value="Entrar" action="#{MBLogin.loginEmpresaF}" />
    		  </p:column>    		
    		</p:row>
    	  </p:panelGrid>
        </p:tab>  
        
        
        
         <p:tab title="Pessoa Jurídica">
           <p:panelGrid>  
            <p:row >  
        		<p:column rowspan="4">
           			<p:graphicImage url="/imagens/empresa.jpg" width="50" heigth="50"/>
           			<br></br>
           			<p:commandLink value ="Esqueceu sua senha?" />
           			<br></br>
           			<p:commandLink value ="Cadastre-se"  actionListener="#{MBEmpregador.desabilitaDialog}" action="#{MBEmpregador.prepararNovoJ}"  />       		 
        		</p:column>
        		<p:column>
          			ID: 
          		</p:column>
        		<p:column>
        		    <p:inputMask mask="99.999.999/9999-99" size="20" value="#{MBLogin.usEmp}" />
        		</p:column>   
    		</p:row>
    		<p:row>
    		    <p:column>
          			Senha:
        		</p:column>   
        		<p:column>
          			<p:password size="20" value="#{MBLogin.senhaEmp}" />
        		</p:column>   		
    		</p:row>
    		<p:row>
    		  <p:column colspan="2">
    		     <p:commandButton value="Entrar" action="#{MBLogin.loginEmpresaJ}" />
    		  </p:column>    		
    		</p:row>
    	  </p:panelGrid>
        </p:tab>  
      </p:tabView>
      </div>	 
     
    	
    	  <p:dialog widgetVar="adm" modal="true" position="center" closable="true" height="150" width="500" resizable="false" header="LOGIN ADMINISTRAÇÃO" >  
        	<center>
        	  <h:panelGrid width="400">
        	    <p:row> 
        		 <p:column>
          			Registro: 
          		 </p:column>
        		 <p:column>
        		    <p:inputText size="20" />
        		  </p:column>   
    		    </p:row>
    		    <p:row>
    		      <p:column>
          			Senha:
        		   </p:column>   
        		 <p:column>
          			<p:password size="20" />
        		</p:column>   		
    		</p:row>
        		<br/>
        	   </h:panelGrid>         
        	   <p:commandButton value="ENTRAR" action="#{MBLogin.loginAdm}" onclick="dialog.hide()"/>
        	</center>
    	</p:dialog>
    	
    	
    	<p:outputPanel id="oplDialog" layout="block">
        <p:dialog widgetVar="mensagem" modal="false" visible="true" position="center" closable="false" height="100" width="500" resizable="false" rendered="#{MBLogin.exibeDialog}" >  
        	<center>
        	  <h:panelGrid width="400"> 
        		 <h:outputText value="#{MBLogin.msg}" />
        		<br/>
        	   </h:panelGrid>         
        	   <p:commandButton value="OKAY" action="#{MBEmpregador.desabilitaDialog}"  onclick="mensagem.hide()"/>
        	</center>
    	</p:dialog>
    	</p:outputPanel>

</h:form> 
</div>
</body>
</html>
